﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true" CodeBehind="AddNewProduct.aspx.cs" Inherits="ShoppingCartWEB.Admin.AddNewProduct" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 134px;
        }
        .style2
        {
            width: 236px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
Add New a Product :
<table style="width: 100%;">
    <tr>
        <td class="style1">
            &nbsp;
            Product Name :</td>
        <td class="style2">
            &nbsp;
            <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
        </td>
        <td>
            &nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtName" ErrorMessage="Enter product name " ForeColor="Red"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;</td>
        <td class="style2">
            &nbsp;
        </td>
        <td>
            &nbsp;
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;
            Category :</td>
        <td class="style2">
            &nbsp;
            <asp:DropDownList ID="ddlCategory" runat="server" Width="155px" Height="21px">
            </asp:DropDownList>
        </td>
        <td>
            &nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="ddlCategory" ErrorMessage="Enter category" ForeColor="Red"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;
            Supplier :
        </td>
        <td class="style2">
            &nbsp;
            <asp:DropDownList ID="ddlSupplier" runat="server" Height="21px" Width="153px">
            </asp:DropDownList>
        </td>
        <td>
            &nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ControlToValidate="ddlSupplier" ErrorMessage="Enter supplier" ForeColor="Red"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;
            Product Price :&nbsp;
        </td>
        <td class="style2">
            &nbsp;
            <asp:TextBox ID="txtPrice" runat="server" Height="18px" Width="151px"></asp:TextBox>
        </td>
        <td>
            &nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                ControlToValidate="txtPrice" ErrorMessage="Enter product price" ForeColor="Red"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;
            Unit :</td>
        <td class="style2">
            &nbsp;
            <asp:TextBox ID="txtUnit" runat="server" Width="153px"></asp:TextBox>
        </td>
        <td>
            &nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                ControlToValidate="txtUnit" ErrorMessage="enter unit product" ForeColor="Red"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;
            Quantity:</td>
        <td class="style2">
            &nbsp;
            <asp:TextBox ID="txtQuantity" runat="server" Width="156px"></asp:TextBox>
        </td>
        <td>
            &nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                ControlToValidate="txtQuantity" ErrorMessage="Enter quantity product" 
                ForeColor="Red"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;
            Image :
        </td>
        <td class="style2">
            &nbsp;
            <asp:FileUpload ID="flImage" runat="server" style="margin-bottom: 0px" />
        </td>
        <td>
            &nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                ControlToValidate="flImage" ErrorMessage="Enter Image link" 
                ForeColor="Red"></asp:RequiredFieldValidator>
                <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ErrorMessage="Image Files Only (.jpg, .bmp, .png, .gif)"" ForeColor="Red" 
                ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF|.jpeg|.JPEG|.bmp|.BMP|.png|.PNG)$" 
                ControlToValidate="flImage"></asp:RegularExpressionValidator>--%>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="flImage"
                    ErrorMessage="Please specify an image with a jpeg, jpg, bmp, gif or png file format." SetFocusOnError="True" ValidationExpression="^.+\.((jpg)|(JPG)|(gif)|(GIF)|(jpeg)|(JPEG)|(png)|(PNG)|(bmp)|(BMP))$"
                    Display="Dynamic" ValidationGroup="Group1"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;
            Decription</td>
        <td class="style2">
            &nbsp;
            <asp:TextBox ID="txtDecription" runat="server" Height="204px" Width="333px" TextMode="MultiLine"></asp:TextBox>
        </td>
        <td>
            &nbsp;
            
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;
        </td>
        <td class="style2">
            &nbsp;
            <asp:Button ID="btnAdd" runat="server" onclick="btnAdd_Click" Text="Add New" 
                PostBackUrl="~/Admin/AdminProduct.aspx" />
        </td>
        <td>
            &nbsp;
        </td>
    </tr>
</table>
</asp:Content>

